package com.hjt.tools.StringTools;

import java.util.Map;

public class MyMessageFormat {
	public static String format(String pattern, Map<String,Object> arguments){
        String formatedStr = pattern;
        for (String key : arguments.keySet()) {
            formatedStr = formatedStr.replaceAll("\\{:"+key+"\\}", arguments.get(key).toString());
        }
        return formatedStr;
    }
}
